-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add backticks to diff messages for trait changes #2075
Conversation
Tests fail since I used System.lineSeparator() instead of "\n", but the testcases use "\n". Should I change my code to use "\n" or change the testcases to check for System.lineSeparator()? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the failing tests, we usually fix the test cases to normalize line endings when we run into these issues. We want to use the right line separator when we write output, but assertions need to be normalized (e.g., find and replace "\r\n" with "\n" on the input and output when doing the assertions).
smithy-model/src/main/java/software/amazon/smithy/model/node/Node.java
Outdated
Show resolved
Hide resolved
smithy-diff/src/main/java/software/amazon/smithy/diff/evaluators/TraitBreakingChange.java
Outdated
Show resolved
Hide resolved
smithy-diff/src/main/java/software/amazon/smithy/diff/evaluators/ModifiedTrait.java
Outdated
Show resolved
Hide resolved
463cffe
to
8cf5028
Compare
8cf5028
to
c20cbf7
Compare
Description of changes:
Adds backticks (or triple backticks) around trait values within diff event messages. This better supports markdown rendering of the messages.
Also changes pretty-printing to use platform-specific line separator through "%n"
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.